<template>
  <NstdRadioGroup  v-model="isCollapse" style="margin-bottom: 20px" :options="options"></NstdRadioGroup >
  <NstdMenu
    default-active="2"
    class="el-menu-vertical-demo"
    :collapse="isCollapse"
    @open="handleOpen"
    @close="handleClose"
  >
    <NstdSubMenu index="1">
      <template #title>
        <el-icon><location /></el-icon>
        <span>Navigator One</span>
      </template>
      <NstdMenuItemGroup>
        <template #title><span>Group One</span></template>
        <NstdMenuItem index="1-1">item one</NstdMenuItem>
        <NstdMenuItem index="1-2">item two</NstdMenuItem>
      </NstdMenuItemGroup>
      <NstdMenuItemGroup title="Group Two">
        <NstdMenuItem index="1-3">item three</NstdMenuItem>
      </NstdMenuItemGroup>
      <NstdSubMenu index="1-4">
        <template #title><span>item four</span></template>
        <NstdMenuItem index="1-4-1">item one</NstdMenuItem>
      </NstdSubMenu>
    </NstdSubMenu>
    <NstdMenuItem index="2">
      <el-icon><icon-menu /></el-icon>
      <template #title>Navigator Two</template>
    </NstdMenuItem>
    <NstdMenuItem index="3" disabled>
      <el-icon><document /></el-icon>
      <template #title>Navigator Three</template>
    </NstdMenuItem>
    <NstdMenuItem index="4">
      <el-icon><setting /></el-icon>
      <template #title>Navigator Four</template>
    </NstdMenuItem>
  </NstdMenu>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import {
  Document,
  Menu as IconMenu,
  Location,
  Setting,
} from '@element-plus/icons-vue'
const options = [
    {
      type: 'radio',
      label: false,
      value: 'Option 1',
      size: 'large'
    },
    {
      type: 'radio',
      label: true,
      value: 'Option 2',
      size: 'large'
    }
  ]
const isCollapse = ref(true)
const handleOpen = (key: string, keyPath: string[]) => {}
const handleClose = (key: string, keyPath: string[]) => {}
</script>

<style>
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}
</style>
